<!-- .container -->
<div class="container marginTop">
	<div class="col-lg-3 catlist">
		<div class="panel">
  		<div class="panel-heading panel-pink">
    		<h3 class="panel-title text-center">Categorie</h3>
  		</div>
 		<div class="panel-body">
	<div class="navbar-default sidebar" role="navigation">
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
							<?php foreach ($category as $c):?>
                        <li <?php if($c->id == $this->uri->segment(3)){?>class="active"<?php }?>>
                           <?php if(!$c->children):?>
                            <a href="<?=site_url()?>categories/view/<?=$c->id?>/<?=$c->friendly_url_nl?>"><?=$c->name_nl?></a>
                           <?php endif;?>
                            <?php if($c->children):?>
                             <a href="#"><?=$c->name_nl?> <span class="fa arrow"></span></a>
                            	<ul class="nav nav-second-level">
                            	<?php foreach ($c->children as $sub):?>
                                <li <?php if($sub->id == $this->uri->segment(3)){?>class="active"<?php }?>>
                                    <?php if(!$sub->children):?>
                                    <a href="<?=site_url()?>categories/view/<?=$sub->id?>/<?=$sub->friendly_url_nl?>"><?=$sub->name_nl?></a>
                                    <?php endif;?>
                                    <?php if($sub->children):?>
                                    <a href="#"><?=$sub->name_nl?> <span class="fa arrow"></span></a>
                                    	 <ul class="nav nav-third-level">
                                    	 <?php foreach ($sub->children as $th):?>
                                        <li <?php if($th->id == $this->uri->segment(3)){?>class="active"<?php }?>>
                                            <a href="#"><?=$th->name_nl?></a>
                                        </li>
                                        <?php endforeach;?>
                                    </ul>
                                    <!-- /.nav-third-level -->
                                    <?php endif;?>
                                </li>
                                <?php endforeach;?>
                            </ul>
                            <?php endif;?>
                        </li>
                        	<?php endforeach;?>                                                                                             
                    </ul>
                </div>
                <!-- /.sidebar-collapse -->
            </div>
            <!-- /.navbar-static-side -->
  		</div>
		</div>
	</div>
	
		<div class="col-lg-9 catThumbs">
		<div class="row">
			<?php if(!$product){?>
  	<div class="alert alert-pink" role="alert">Er zijn geen producten in deze categorie...</div>
  		<?php }else{?>
		<?php foreach ($product as $p):?>
  <div class="col-xs-3 post-box">
  
  
    <div class="thumbnail">
    <?php if($p->thumb){?>
      <a href="<?=site_url()?>categories/viewProduct/<?=$p->category->id?>/<?=$p->category->name_nl?>/<?=$p->id?>"><img src="<?=base_url()?>../uploads/thumbs/<?=$p->thumb?>" alt=""></a>
     <?php }else{?>
      <a href="<?=site_url()?>categories/viewProduct/<?=$p->category->id?>/<?=$p->category->name_nl?>/<?=$p->id?>"><img src="<?=base_url()?>../uploads/no-image.png" alt=""></a>
     <?php }?>
     <?php if($p->sale_status){?>
     <div class="sale">
     	- <?=$p->sale_percent?> %
     </div>
     <?php }?>
      <div class="caption text-center">
        <h4><?=$p->name_nl?></h4>
        <a href="<?=site_url()?>categories/viewProduct/<?=$p->category->id?>/<?=$p->category->name_nl?>/<?=$p->id?>" class="btn btn-pink btn-xs">Detail</a>
      </div>
    </div>
 
  </div>
  <?php endforeach;?>
     <?php }?>
</div>
	
	</div>
	
	
</div>